package com.chat;


import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.HashMap;

public class Demo01 {
    public static void main(String[] args) {
        String strURL = "https://ke.qq.com/webcourse/3061922/103180785?taid=10163327144474786&vid=5285890808746437227";
        HashMap urlMap = new HashMap();
        try {
            URL url = new URL(strURL);
            String query = url.getQuery();
            String[] splitQuery = query.split("&");
            for(String que : splitQuery){
                String[] queSplit = que.split("=");
                urlMap.put(queSplit[0],queSplit[1]);
            }
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }

        System.out.println(urlMap.get("vid"));

    }
}
